home *** CD-ROM | disk | FTP | other *** search
- // %filename% -- dialog
- // Created %date% %time% by AppMaker
-
- #include "U%dlogname%.h"
-
- #ifndef __TYPES__
- #include <Types.h>
- #endif
-
- #ifndef __PACKAGES__
- #include <Packages.h>
- #endif
-
- #include "ResourceDefs.h"
-
- %for each item gen itemNr%
-
- %for each item gen classMethods%
- #pragma segment ARes
- //----------
- pascal void T%dlogname%::DoEvent% %(EventNumber eventNumber,
- TEventHandler *source,
- TEvent *event)
- {
- long origID;
-
- origID = (long) (source->fIdentifier);
- %if modalOneShot%
- switch (origID) {
- %for each item gen doOneShot%
-
- } /* switch */
- %else%
- switch (origID) {
- %for each item gen doChoice%
-
- } /* switch */
-
- inherited::DoEvent (eventNumber, source, event);
- %endif%
- } /* HandleEvent */
-
- %if modeless%
- #pragma segment AOpen
- //----------
- TWindow *New%dlogname% (void)
- {
- TWindow *theWindow;
-
- theWindow = gViewServer->NewTemplateWindow (k%dlogname%ID, NULL);
- theWindow->fFreeOnClosing = FALSE;
-
- // initialize subviews from current settings
-
- macroDontDeadStrip (T%dlogname%);
- %for each item gen gDeadStripSuppression%
-
- return (theWindow);
- } /*New%dlogname%*/
- %else%
- #pragma segment ASelCommand
- //----------
- void Do%dlogname% (void)
- {
- TWindow *aWindow;
- TDialogView *aDialogView;
- OSType dismisser;
-
- aWindow = gViewServer->NewTemplateWindow (k%dlogname%ID, NULL);
- FailNIL (aWindow);
-
- // initialize subviews from current settings
-
- aDialogView = (TDialogView *)(aWindow->FindSubView ('dlog'));
- dismisser = aWindow->PoseModally ();
- if (dismisser != aDialogView->fCancelItem) {
- // use new settings from subviews
- }
- aWindow->CloseAndFree ();
-
- macroDontDeadStrip (T%dlogname%);
- %for each item gen gDeadStripSuppression%
-
- } /* Do%dlogname% */
-
- /* U%dlogname% */
-